package com.financial.service.heemoney.convertor;

import com.financial.service.heemoney.dto.HeemoneyConfigDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyProviderSubmitBusinessDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneyProviderSubmitCommonDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyProviderSubmitInParamDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author: zhaopengjun
 * @Email dashuaizhao@aliyun.com
 * @Date: 2019/12/9 14:59
 * @Des
 */
@Mapper
public interface HeemoneyProviderSubmitConvert {


    HeemoneyProviderSubmitConvert MAPPER = Mappers.getMapper(HeemoneyProviderSubmitConvert.class);
    @Mapping(target = "method", source = "heemoneyConfigDTO.heemoneyProviderSubmit.method")
    @Mapping(target = "isv_mch_uid", source = "heemoneyConfigDTO.heemoneyAccountType.isv_mch_uid")
    @Mapping(target = "isv_app_id",source ="heemoneyConfigDTO.heemoneyAccountType.app_id")
    @Mapping(target = "key",source ="heemoneyConfigDTO.heemoneyAccountType.key")
    HeemoneyProviderSubmitCommonDTO configDTOConvertCommonDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyProviderSubmitInParamDTO heemoneyProviderSubmitInParamDTO);

    HeemoneyProviderSubmitBusinessDTO configDTOConvertBusinessDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyProviderSubmitInParamDTO heemoneyProviderSubmitInParamDTO);
}

